public final class UserAPI extends Object
UserAPI provides SecureLogin SSO customers with a method of manipulating SSO data using Java. The first thing to do is to create an instance of UserAPI. To do this you will need to provide data about how to connect to your directory and your Schlapi license key.
This information is provided by implementing the SchlapiConfig interface - UserAPI and its supporting classes will query this interface for information as it is required.
Once an UserAPI instance has been created you will need to attach to a user object by LDAP DN before calling the other methods. eg:
UserAPI api = new UserAPI(new MyConfig()); api.attach("cn=myname,cn=users,dc=protocom,dc=com"); String question = api.getQuestion();
UserAPI instances are not locked to an object after attach is called. To query another LDAP object, simply call attach with that object's DN.
SchlapiConfig
,
SchlapiException
Constructor and Description |
---|
UserAPI(SchlapiConfig config)
Creates an UserAPI instance.
|
Modifier and Type | Method and Description |
---|---|
void |
attach(String object)
Attaches this instance to an LDAP object.
|
void |
close()
This is not counterpart of attach but should be called when you no longer need
the UserAPI instance so that LDAP connections can be cleaned up.
|
void |
deprovisionAccount(String account)
Removes an account from the directory.
|
void |
eraseUser()
Remove all the user specific data by deleting the LDAP entries
Running client with cache file present will recover the data
|
String |
getQuestion()
Returns the SecureLogin SSO passphrase question.
|
void |
provisionAccount(String account,
Map credentials,
String description)
Creates an account and provisions credentials.
|
void |
provisionLinks(String platform,
String credId,
String isSetPlat)
Link a credential to specific application.
|
void |
provisionPassphraseQA(String password,
String question,
String answer)
Provisions an account with a new passphrase question and answer.
|
void |
removeNonRepudiation(String password,
String answer)
Re-encrypts the user's entries using the newly chosen Windows password.
|
boolean |
verifyAnswer(String answer)
Indicates whether the answer to the SecureLogin SSO question is correct.
|
public UserAPI(SchlapiConfig config) throws com.protocom.util.StandardException
config
- Directory configurationcom.protocom.util.StandardException
public void attach(String object) throws com.protocom.util.StandardException
object
- LDAP DN to attach to.com.protocom.util.StandardException
SchlapiConfig.getContexts()
public void close()
public String getQuestion() throws com.protocom.util.StandardException
com.protocom.util.StandardException
public boolean verifyAnswer(String answer) throws com.protocom.util.StandardException
answer
- Answer to verifycom.protocom.util.StandardException
public void removeNonRepudiation(String password, String answer) throws com.protocom.util.StandardException
Removes the non-repudiation prompt on a user's next login, immediately after the have changed their password only. As the user has just answered their passphrase in order to change their password, it's nice if they don't have to answer it again, immediately at their next login.
Both the new password and the passphrase answer are required before the change passphrase prompt is removed.
password
- The new password that has been set, if this is wrong then the user
will still be prompted for their passphrase at next login.answer
- The answer to the user's passphrase question. This is checked for
accuracy and the operation will not proceed if the answer is incorrect.com.protocom.util.StandardException
public void provisionPassphraseQA(String password, String question, String answer) throws com.protocom.util.StandardException
password
- question
- answer
- com.protocom.util.StandardException
public void provisionAccount(String account, Map credentials, String description) throws com.protocom.util.StandardException
Creates an account and provisions credentials. The value for account is used to identify this account. That is to say, the values in the credentials Map will be associated with the account name passed in here.
It is also possible to use this method to update or add values to existing accounts. For example, if a user already has credentials for an account it is possible to update them with this method.account
- The account idcredentials
- Contains the credentials to provision. The key/value pairs
in the Map correspond with credential name/value pairs (eg. 'password'/'abc').description
- Optional (may be null).com.protocom.util.StandardException
public void deprovisionAccount(String account) throws com.protocom.util.StandardException
account
- Name (id) of the account to be removed.com.protocom.util.StandardException
public void provisionLinks(String platform, String credId, String isSetPlat) throws com.protocom.util.StandardException
Link a credential to specific application. Need to specify platform(application) name, Credential identifier.
platform
- Apllication IDcredId
- Credential IDisSetPlat
- enable SetPlat.com.protocom.util.StandardException
public void eraseUser() throws com.protocom.util.StandardException
com.protocom.util.StandardException
Copyright © 2019 NetIQ Corporation. All rights reserved.